symbols.c: avoid warn_unused_result build failure on fgets()
authorRiku Voipio <riku.voipio@linaro.org>
Tue, 10 Nov 2015 11:07:55 +0000 (12:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Nov 2015 11:07:55 +0000 (12:07 +0100)
commit85ad62ecb8c2b31bf13b5e88696ec1d42c7031e4
tree31ced3d0067a63e8c0c5ca5bf6c9d423ffc46526
parent4d81504ff449010daf69d930ebcd2d23b19a1cda
symbols.c: avoid warn_unused_result build failure on fgets()

In commit:

d37d63d symbols: prefix static symbols with their source file names

An unchecked fgets was added. This causes a compile error at least
on ubuntu utopic:

symbols.c: In function 'read_symbol':
symbols.c:181:3: error: ignoring return value of 'fgets', declared with
attribute warn_unused_result [-Werror=unused-result]
   fgets(str, 500, in); /* discard rest of line */
   ^

Paper over the warning by checking the return value in the if statement.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/tools/symbols.c